package com.limh.keepalive.notify

import android.service.notification.NotificationListenerService
import android.service.notification.StatusBarNotification
import android.util.Log

/**
 * @author: limh
 * @desc: 通知读取监听
 * @date: 2022/5/8 20:57
 */
class NotificationListener : NotificationListenerService() {

    private val TAG="alive-Notify"

    override fun onNotificationPosted(sbn: StatusBarNotification?) {
        super.onNotificationPosted(sbn)
        sbn?.let {
            Log.d(TAG,"收到通知：${it.packageName}")
        }
    }
}